import face_recognition
import os

# 存储知道人名列表
#global known_names
known_names = []
# 存储知道的特征值
#global known_encodings
known_encodings = []
path = "./data/jm/"
for image_name in os.listdir(path):
    load_image = face_recognition.load_image_file(path + image_name)  # 加载图片
    image_face_encoding = face_recognition.face_encodings(load_image)[0]  # 获得128维特征值
    known_names.append(image_name.split(".")[0])
    known_encodings.append(image_face_encoding)
# print(known_encodings)